package com.jia.springcloud.service;

import com.jia.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 1038940655
 * @create 2021/1/22 10:28
 */
@Service
@FeignClient(value = "SPRINGCLOUD-PROVIDER-PAYMENT",fallback = PaymentFallbackService.class)
public interface PaymentHystrixService {

    @RequestMapping("/payment/hystrix/ok/{id}")
    public Payment getPaymentById(@PathVariable("id") Integer id);

    @RequestMapping("/payment/hystrix/timeout")
    public String paymentInfo_TimeOut();
}
